{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="{% static 'layui/css/layui.css' %}" rel="stylesheet">
    <script src=" {% static 'layui/layui.js' %}"></script>
    <script src=" /static/js/jquery-3.3.1.min.js"></script>
    <title>首页</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">设备管理</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    星朵
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="manu">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class='manu-left' href="javascript:;">设备管理</a>
                    <div class="layui-nav-child">
                        <dd><a data-src="devices">设备列表</a></dd>
                        <dd><a  data-src="devicesmanager">设备管理</a></dd>
{#                        <dd><a data-src="device2">设备</a></dd>#}
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-body" name="content" id="content">
        <!-- 内容主体区域 -->
        {#        <div style="padding: 15px;">内容主体区域</div>#}
        <iframe style="width: 100%;height: 100%;" scrolling="no" src="devices"></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 设备管理
    </div>
</div>
</body>
<script>
    {#layui.use('element', function () {#}
    {#    var element = layui.element();#}
    {#{);#}
    {#实现点击左侧导航，内容显示在右侧内容区域的js#}
        $(function(){
            $(".layui-nav-child dd a").on("click",function(){
                var address =$(this).attr("data-src");
                $("iframe").attr("src",address);
            });
        });

</script>
</html>